package com.mf.controller;

import com.mf.dto.MACD.TimeHorizonDto;
import com.mf.entity.WinRate;
import com.mf.service.IWinRateService;
import com.mf.utils.Result;
import com.mf.vo.FindWinRateVo;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 胜率表 前端控制器
 * </p>
 *
 * @author mf
 * @since 2024-05-03
 */
@RestController
@RequestMapping("/stock/winRate")
@Tag(name = "胜率表")
public class WinRateController {
    @Resource
    private IWinRateService winRateService;

    @PostMapping("/findWinRate")
    public Result<List<FindWinRateVo>> findWinRate(@RequestBody TimeHorizonDto timeHorizon)
    {
        return  Result.success(winRateService.findWinRate(timeHorizon));
    }
}
